home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 40 / 64er_Magazin_Sonderheft_40_19xx_Markt__Technik_de.d64 / format. string (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  697b  |  21 lines

  1. 1 rem ***** formatierter string *****         ***** made by a.stranzinger ***
  2. 2 a$="formatierte ausgabe eines strings - idee von a.stranzinger am 01.10.88 "
  3. 3 ad=58732:l=len(a$)
  4. 4 input"[147] spaltenbeginn   3[157][157][157]";sb
  5. 5 input" spaltenende     36[157][157][157][157]";se
  6. 6 input" zeilenabstand   3[157][157][157]";za
  7. 7 print"[147]0---------1---------2---------3---------":poke211,sb:sysad
  8. 8 for a=1 to l:b$=mid$(a$,a,1)
  9. 9 if b$=chr$(32)thengosub12:b$=mid$(a$,a,1)
  10. 10 print b$;:next
  11. 11 a=0:gosub12:goto8
  12. 12 x=peek(211):y=peek(214):p=se-x
  13. 13 for b=a+1 to l:c$=mid$(a$,b,1)
  14. 14 : if c$=chr$(32)then 16
  15. 15 next
  16. 16 c=b-(a+2):if c<p then poke211,x:poke214,y:sysad:return
  17. 17 ify<20then20
  18. 18 poke211,0:poke214,23:sysad
  19. 19 print"druecken sie f7 fuer ein anderes format ":poke198,0:wait198,1:run
  20. 20 poke211,sb:poke214,y+za:sysad:a=a+1:return
  21.